<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
<title>title</title>   
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
	<link href='https://cdn.rawgit.com/openhiun/hangul/14c0f6faa2941116bb53001d6a7dcd5e82300c3f/nanumbarungothic.css' rel='stylesheet' type='text/css'>

<style type="text/css">
	@import url(https://cdn.rawgit.com/openhiun/hangul/14c0f6faa2941116bb53001d6a7dcd5e82300c3f/nanumbarungothic.css);
	a,b,body,br,button,dd,div,dl,dt,d,font,form,h1,h2,h3,h4,h5,h6,hr,input,i,label,legend,li,link,marquee,ol,optgroup,option,p,pre,q,select,small,span,strike,strong,table,tbody,td,textarea,tfoot,th,thead,tr,tt,u,ul,var{
		font-family: 'Nanum Barun Gothic', sans-serif;
	}
</style>
	
<script type="text/javascript">
	function logout() {
		location.replace("/OffTheRecord/logout.action");
	}
	
	function searchCompany(){
		var f = document.searchForm;
		if(f.companyName.value==""){
			alert("회사명을 입력해주세요.");
			f.companyName.focus();
			return false;
		}else{
			f.submit();
		}
		
	}
</script>

</head>
<body>
<script type="text/javascript">
	function openLogin(){
		window.open("/OffTheRecord/common/login.jsp", "","resizable=no,toolbar=no,width=400, height=300");
	}
</script>
<div class="container">
<div class="row">


<!-- top -->
<nav class="navbar navbar-inverse navbar-fixed-top">
	<!-- nav -->
	<div class="container-fluid">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar">
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>                        
          	</button>
          	<a class="navbar-brand" href="/OffTheRecord/index/index.jsp"><strong>OFF the Record</strong></a>
        </div>
        
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="myNavbar">
        	<ul class="nav navbar-nav">
            
          	<li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">기업 검색<span class="caret"></span></a>
              	<ul class="dropdown-menu">
                <li><a href="/OffTheRecord/getCompanyByIndustryName.action?industryName=건설&&pageNo=1">카테고리별 검색</a></li>
                <li><a href="/OffTheRecord/customCompanyList.action">맞춤형 검색</a></li>
              	</ul>
            </li>
          	
            <li class="dropdown"><a class="dropdown-toggle" data-toggle="dropdown" href="#">멘토링<span class="caret"></span></a>
              	<ul class="dropdown-menu">
                <li><a href="/OffTheRecord/mentor/mentor_intro.jsp">멘토링이란?</a></li>
                <li><a href="/OffTheRecord/mentor/mentor_apply.jsp">멘토신청</a></li>
                <li><a href="/OffTheRecord/getAllCompany.action?flag=4">멘토찾기</a></li>
              	</ul>
            </li>
            
            <li><a href="/OffTheRecord/getBoardListByPage.action?pageNo=1">자유게시판</a></li>
            <li><a href="/OffTheRecord/getNoticeListByPage.action?pageNo=1">공지사항</a></li>
            
          	</ul>
          	
          	<c:choose>
				<c:when test="${sessionScope.adminVo==null && sessionScope.userVo == null}">
          	<ul class="nav navbar-nav navbar-right">
          	<li><a href="/OffTheRecord/user/register.jsp"><span class="glyphicon glyphicon-user"></span> 시작하기</a></li>
            <li><a href="" onclick="openLogin()"><span class="glyphicon glyphicon-log-in"></span> 로그인</a></li>
          	</ul>
      			</c:when>
      			<c:when test="${sessionScope.userVo != null }">
          	<ul class="nav navbar-nav navbar-right">
          	<li><a href="/OffTheRecord/getAllMessage.action?mpageNo=1"><span class="glyphicon glyphicon-envelope"></span> <span class="badge">${userVo.message }</span></a></li>
            <li><a href="/OffTheRecord/userInfo.action"><span class="glyphicon glyphicon-user"></span> ${sessionScope.userVo.userId } 님 로그인 중</a></li>
          	<li><a href="#" onclick="logout(); return false"><span class="glyphicon glyphicon-log-out"></span> 로그아웃</a></li>
          	</ul>
          		</c:when>
          		<c:when test="${sessionScope.adminVo!=null }">
          	<ul class="nav navbar-nav navbar-right">
          	<li><a href="/OffTheRecord/getAllMessage.action?mpageNo=1"><span class="glyphicon glyphicon-envelope"></span> <span class="badge">${adminVo.message }</span></a></li>
            <li><a href="/OffTheRecord/admin/admin_info.jsp"><span class="glyphicon glyphicon-user"></span> 관리자 로그인 중</a></li>
            <li><a href="#" onclick="logout(); return false"><span class="glyphicon glyphicon-log-out"></span> 로그아웃</a></li>
          	</ul>
          		</c:when>
			</c:choose>
			<ul class="nav navbar-nav navbar-center" style="margin-bottom: 20px;">
          	<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3"><c:if test="${sessionScope.adminVo != null}">
						<!-- admin 일 경우 -->
						<button style="float: right;" type="button" class="btn btn-default"
							onclick="location.href='/OffTheRecord/admin/admin_info.jsp'">홈페이지
							관리하러 가기</button>
						<!-- admin 일 경우 -->
					</c:if>
				
          	</div>
          	<div class="col-lg-6 col-sm-6 col-md-6 col-lg-6">
          	<li>
	        	<form class="form"action="/OffTheRecord/searchCompanyByName.action" method="post" role="form" name="searchForm" onsubmit="searchCompany(); return false">
									<div class="input-group">
				    	<input type="text" class="form-control" id="top_search_company" name="companyName" placeholder="회사명으로 검색해주세요.">
					    <span class="input-group-btn">
					    <input class="btn btn-default" type="submit" value="검색"/>
					    </span>
					</div>
				</form>
            </li>
            </div>
            <div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
            	<button type="button" class="btn btn-danger" onclick="location.href='/OffTheRecord/getAllList.action'">기업 리뷰 작성하러가기</button>
          	</div>
            </ul>
		</div>
	</div>
</nav>
<!--  -->


</div><!-- row -->
</div><!-- container -->

    <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>  
</body>
</html>